package cn.nupt.service;

import cn.nupt.dao.YearCardDAOImpl;

public class YearCardService {
	//增加一张年卡，并返回年卡id
	public int addYearCard(){
		YearCardDAOImpl yearCardImpl = new YearCardDAOImpl();
		//查找当前表的最大值
		int maxId =yearCardImpl.selectMaxCardId();
		maxId++;//最大值加1
		yearCardImpl.insertYearCard(maxId);
		return maxId;
	}
	
}
